<html>
<head>
 <script>
   function onLoad() {
     document.title = "";

     var anchor = document.getElementById("anchorTag");
     anchor.addEventListener("dragstart", function(event) { document.title += "dragstart@a,"; });
     anchor.addEventListener("contextmenu", function(event) { document.title += "contextmenu@a,"; });

    var image = document.getElementById("imageTag");
    image.addEventListener("dragstart", function(event) { document.title += "dragstart@img,"; });
    image.addEventListener("contextmenu", function(event) { document.title += "contextmenu@img,"; })
  }
</script>
</head>
<body onload="onLoad()">
  <a id="anchorTag" href="http://www.example.com">Link to example.com</a>
  <img id="imageTag" src="foo.png" width="100" height="100">Link to an image.</img>
</body>
<html>
